﻿using System.IO;
using System.Linq;

namespace Citi.ReportManager.WebUi.Utils
{
    public class IconHelper
    {
        public static string GetFileIcon(string file, string imageFile)
        {
            var image = string.Format("{0}.png", Path.GetExtension(file).Replace(".", string.Empty));
            var icon = Directory.GetFiles(imageFile).Any(y => Path.GetFileName(y) == image) ? image : "file.png";
            return icon;
        }
    }
}